package com.mlingdu.streamer_task;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;

import com.mlingdu.streamer_task.streamer.CameraView;
import com.mlingdu.streamer_task.streamer.Publisher;

public class MainActivity extends AppCompatActivity {

    private CameraView mCameraView;
    private Button mBtnPublish;
    private EditText mEtUrl;
    private Publisher mPublisher;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    private void initView() {
        mCameraView = findViewById(R.id.surfaceview_camera);
        mBtnPublish = (Button) findViewById(R.id.publish);
        mEtUrl = (EditText) findViewById(R.id.url);

        mPublisher = new Publisher(mCameraView);
        mPublisher.setPreviewResolution(640, 480);
        mPublisher.startCamera();
    }
}
